
<!DOCTYPE html>

<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

    <title>Security Descriptors &#8212; pysmb 1.2.8 documentation</title>
    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/sphinxdoc.css" />
    <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
    <script src="../_static/jquery.js"></script>
    <script src="../_static/underscore.js"></script>
    <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
    <script src="../_static/doctools.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Extending pysmb For Other Frameworks" href="../extending.html" />
    <link rel="prev" title="SMB Exceptions" href="smb_exceptions.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../extending.html" title="Extending pysmb For Other Frameworks"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="smb_exceptions.html" title="SMB Exceptions"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">pysmb 1.2.8 documentation</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">Security Descriptors</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="module-smb.security_descriptors">
<span id="security-descriptors"></span><h1>Security Descriptors<a class="headerlink" href="#module-smb.security_descriptors" title="Permalink to this heading">¶</a></h1>
<p>This module implements security descriptors, and associated data
structures, as specified in <a class="reference external" href="https://msdn.microsoft.com/en-us/library/cc230273.aspx">[MS-DTYP]</a>.</p>
<dl class="py class">
<dt class="sig sig-object py" id="smb.security_descriptors.SID">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">smb.security_descriptors.</span></span><span class="sig-name descname"><span class="pre">SID</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">revision</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">identifier_authority</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">subauthorities</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/smb/security_descriptors.html#SID"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#smb.security_descriptors.SID" title="Permalink to this definition">¶</a></dt>
<dd><p>A Windows security identifier. Represents a single principal, such a
user or a group, as a sequence of numbers consisting of the revision,
identifier authority, and a variable-length list of subauthorities.</p>
<p>See [MS-DTYP]: 2.4.2</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="smb.security_descriptors.SID.identifier_authority">
<span class="sig-name descname"><span class="pre">identifier_authority</span></span><a class="headerlink" href="#smb.security_descriptors.SID.identifier_authority" title="Permalink to this definition">¶</a></dt>
<dd><p>An integer representing the identifier authority.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="smb.security_descriptors.SID.revision">
<span class="sig-name descname"><span class="pre">revision</span></span><a class="headerlink" href="#smb.security_descriptors.SID.revision" title="Permalink to this definition">¶</a></dt>
<dd><p>Revision, should always be 1.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="smb.security_descriptors.SID.subauthorities">
<span class="sig-name descname"><span class="pre">subauthorities</span></span><a class="headerlink" href="#smb.security_descriptors.SID.subauthorities" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of integers representing all subauthorities.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="smb.security_descriptors.ACE">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">smb.security_descriptors.</span></span><span class="sig-name descname"><span class="pre">ACE</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">type_</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">flags</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mask</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sid</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">additional_data</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/smb/security_descriptors.html#ACE"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#smb.security_descriptors.ACE" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a single access control entry.</p>
<p>See [MS-DTYP]: 2.4.4</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="smb.security_descriptors.ACE.additional_data">
<span class="sig-name descname"><span class="pre">additional_data</span></span><a class="headerlink" href="#smb.security_descriptors.ACE.additional_data" title="Permalink to this definition">¶</a></dt>
<dd><p>A dictionary of additional fields present in the ACE, depending
on the type. The following fields can be present:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">flags</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">object_type</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">inherited_object_type</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">application_data</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">attribute_data</span></code></p></li>
</ul>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="smb.security_descriptors.ACE.flags">
<span class="sig-name descname"><span class="pre">flags</span></span><a class="headerlink" href="#smb.security_descriptors.ACE.flags" title="Permalink to this definition">¶</a></dt>
<dd><p>An integer bitmask with ACE flags, corresponds to the
<code class="docutils literal notranslate"><span class="pre">AceFlags</span></code> field.</p>
</dd></dl>

<dl class="py property">
<dt class="sig sig-object py" id="smb.security_descriptors.ACE.isInheritOnly">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">isInheritOnly</span></span><a class="headerlink" href="#smb.security_descriptors.ACE.isInheritOnly" title="Permalink to this definition">¶</a></dt>
<dd><p>Convenience property which indicates if this ACE is inherit
only, meaning that it doesn’t apply to the object itself.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="smb.security_descriptors.ACE.mask">
<span class="sig-name descname"><span class="pre">mask</span></span><a class="headerlink" href="#smb.security_descriptors.ACE.mask" title="Permalink to this definition">¶</a></dt>
<dd><p>An integer representing the <code class="docutils literal notranslate"><span class="pre">ACCESS_MASK</span></code> as specified in
[MS-DTYP] 2.4.3.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="smb.security_descriptors.ACE.sid">
<span class="sig-name descname"><span class="pre">sid</span></span><a class="headerlink" href="#smb.security_descriptors.ACE.sid" title="Permalink to this definition">¶</a></dt>
<dd><p>The <a class="reference internal" href="#smb.security_descriptors.SID" title="smb.security_descriptors.SID"><code class="xref py py-class docutils literal notranslate"><span class="pre">SID</span></code></a> of a trustee.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="smb.security_descriptors.ACE.type">
<span class="sig-name descname"><span class="pre">type</span></span><a class="headerlink" href="#smb.security_descriptors.ACE.type" title="Permalink to this definition">¶</a></dt>
<dd><p>An integer representing the type of the ACE. One of the
<code class="docutils literal notranslate"><span class="pre">ACE_TYPE_*</span></code> constants. Corresponds to the <code class="docutils literal notranslate"><span class="pre">AceType</span></code> field
from [MS-DTYP] 2.4.4.1.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="smb.security_descriptors.ACL">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">smb.security_descriptors.</span></span><span class="sig-name descname"><span class="pre">ACL</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">revision</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">aces</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/smb/security_descriptors.html#ACL"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#smb.security_descriptors.ACL" title="Permalink to this definition">¶</a></dt>
<dd><p>Access control list, encapsulating a sequence of access control
entries.</p>
<p>See [MS-DTYP]: 2.4.5</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="smb.security_descriptors.ACL.aces">
<span class="sig-name descname"><span class="pre">aces</span></span><a class="headerlink" href="#smb.security_descriptors.ACL.aces" title="Permalink to this definition">¶</a></dt>
<dd><p>List of <a class="reference internal" href="#smb.security_descriptors.ACE" title="smb.security_descriptors.ACE"><code class="xref py py-class docutils literal notranslate"><span class="pre">ACE</span></code></a> instances.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="smb.security_descriptors.ACL.revision">
<span class="sig-name descname"><span class="pre">revision</span></span><a class="headerlink" href="#smb.security_descriptors.ACL.revision" title="Permalink to this definition">¶</a></dt>
<dd><p>Integer value of the revision.</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="smb.security_descriptors.SecurityDescriptor">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">smb.security_descriptors.</span></span><span class="sig-name descname"><span class="pre">SecurityDescriptor</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">flags</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">owner</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">group</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dacl</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sacl</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/smb/security_descriptors.html#SecurityDescriptor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#smb.security_descriptors.SecurityDescriptor" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a security descriptor.</p>
<p>See [MS-DTYP]: 2.4.6</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="smb.security_descriptors.SecurityDescriptor.dacl">
<span class="sig-name descname"><span class="pre">dacl</span></span><a class="headerlink" href="#smb.security_descriptors.SecurityDescriptor.dacl" title="Permalink to this definition">¶</a></dt>
<dd><p>Instance of <a class="reference internal" href="#smb.security_descriptors.ACL" title="smb.security_descriptors.ACL"><code class="xref py py-class docutils literal notranslate"><span class="pre">ACL</span></code></a> representing the discretionary access
control list, which specifies access restrictions of an object.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="smb.security_descriptors.SecurityDescriptor.flags">
<span class="sig-name descname"><span class="pre">flags</span></span><a class="headerlink" href="#smb.security_descriptors.SecurityDescriptor.flags" title="Permalink to this definition">¶</a></dt>
<dd><p>Integer bitmask of control flags. Corresponds to the
<code class="docutils literal notranslate"><span class="pre">Control</span></code> field in [MS-DTYP] 2.4.6.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="smb.security_descriptors.SecurityDescriptor.group">
<span class="sig-name descname"><span class="pre">group</span></span><a class="headerlink" href="#smb.security_descriptors.SecurityDescriptor.group" title="Permalink to this definition">¶</a></dt>
<dd><p>Instance of <a class="reference internal" href="#smb.security_descriptors.SID" title="smb.security_descriptors.SID"><code class="xref py py-class docutils literal notranslate"><span class="pre">SID</span></code></a> representing the owner group.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="smb.security_descriptors.SecurityDescriptor.owner">
<span class="sig-name descname"><span class="pre">owner</span></span><a class="headerlink" href="#smb.security_descriptors.SecurityDescriptor.owner" title="Permalink to this definition">¶</a></dt>
<dd><p>Instance of <a class="reference internal" href="#smb.security_descriptors.SID" title="smb.security_descriptors.SID"><code class="xref py py-class docutils literal notranslate"><span class="pre">SID</span></code></a> representing the owner user.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="smb.security_descriptors.SecurityDescriptor.sacl">
<span class="sig-name descname"><span class="pre">sacl</span></span><a class="headerlink" href="#smb.security_descriptors.SecurityDescriptor.sacl" title="Permalink to this definition">¶</a></dt>
<dd><p>Instance of <a class="reference internal" href="#smb.security_descriptors.ACL" title="smb.security_descriptors.ACL"><code class="xref py py-class docutils literal notranslate"><span class="pre">ACL</span></code></a> representing the system access control
list, which specifies audit logging of an object.</p>
</dd></dl>

</dd></dl>

</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <div>
    <h4>Previous topic</h4>
    <p class="topless"><a href="smb_exceptions.html"
                          title="previous chapter">SMB Exceptions</a></p>
  </div>
  <div>
    <h4>Next topic</h4>
    <p class="topless"><a href="../extending.html"
                          title="next chapter">Extending pysmb For Other Frameworks</a></p>
  </div>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/api/smb_security_descriptors.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../extending.html" title="Extending pysmb For Other Frameworks"
             >next</a> |</li>
        <li class="right" >
          <a href="smb_exceptions.html" title="SMB Exceptions"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../index.html">pysmb 1.2.8 documentation</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">Security Descriptors</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2001-2021, Michael Teo https://miketeo.net/.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.0.1.
    </div>
  </body>
</html>